#ifndef BOOK_H
#define BOOK_H

#include <time.h>

// 前置声明SeqList，避免循环包含
typedef struct SeqList SeqList;

// 图书状态
typedef enum {
    AVAILABLE,
    BORROWED
} BookStatus;

// 图书结构体
typedef struct {
    char id[20];
    char title[100];
    char author[50];
    char publisher[50];
    int publishYear;
    BookStatus status;
    char borrower[20];
    time_t borrowDate;
} Book;

// 图书业务函数声明
void AddBook(SeqList* list);
void DeleteBook(SeqList* list);
void SearchBookById(SeqList* list);
void SearchBookByKeyword(SeqList* list);
void BorrowBook(SeqList* list);
void ReturnBook(SeqList* list);
void ShowAllBooks(SeqList* list);

#endif